package com.jh.test;

public class Type 
{
	public void intChar()
	{
		int a = 65;
		char c = (char)a;
		
		System.out.print("intChar :" );
		System.out.println(c);
	}
	
	public void charInt()
	{
		char c = 'A';
		int a = (int)c;
		
		System.out.print("charInt :" );
		System.out.println(a);
	}
	
	public void charIntChar()
	{
		char c = 'A';
		int a = (int)c;
		char h = (char)a;
		
		
		System.out.print("charIntChar :" );
		System.out.println(a);
		System.out.println(h);
	}
	
	public void charNumIntNum()
	{
		char c = 'A';
		int a = (int)c;
		
		System.out.print("charNumIntNum :" );
		System.out.println(a);
		System.out.println(a+2 +" : a + 2");
	}
	
	public void charNumIntNum2()
	{
		char c = 'a';
		int a = (int)c;
		
		System.out.print("charNumIntNum2 :" );
		System.out.println(a);
	}
	
	public void stringNumIntNum()
	{
		String s = "34";
		int a = Integer.parseInt(s);
		
		System.out.print("stringNumIntNum :" );
		System.out.println(a);
	}
	
	public void stringLongNumDouble()
	{
		String s = "34.5";
		double d = Double.parseDouble(s);
		
		System.out.print("stringLongNumDouble :" );
		System.out.println(d);
	}
	
	public void intString()
	{
		int a = 10;
		String s = String.valueOf(a);
		
		System.out.print("intString :" );
		System.out.println(s);
	}
	
	public void intString2()
	{
		int a = 10;
		String s = "";
		
		System.out.print("intString2 :" );
		System.out.println(s+a);
	}
	
	public void stringChar()
	{
		String s = "k";
		char c = s.charAt(0);
		
		System.out.print("stringChar :" );
		System.out.println(c);
	}
	
	public void charString()
	{
		char c = 'B';
		String s = String.valueOf(c);
		
		System.out.print("charString :" );
		System.out.println(s);
	}
	
	public void charArrString()
	{
		char[] c = {'a','b','c'};
		String s = new String(c);
		
		System.out.print("charArrString :" );
		System.out.println(s);
	}
	
	public void stringCharArr()
	{
		String s = "def";
		char[] c = s.toCharArray();
		
		System.out.print("stringCharArr :" );
		System.out.println(c);
	}
	
	public void decimalBinaryString()
	{
		int a = 20;
		String s = Integer.toBinaryString(a);
		
		System.out.print("decimalBinaryString :" );
		System.out.println(s);
	}
	
	public void decimalOctaString()
	{
		int a = 20;
		String s = Integer.toOctalString(a);
		
		System.out.print("decimalOctaString :" );
		System.out.println(s);
	}
	
	public void decimalHexString()
	{
		int a = 20;
		String s = Integer.toHexString(a);
		
		System.out.print("decimalOctaString :" );
		System.out.println(s);
	}
	
	public void stringLowerUpper()
	{
		String s = "korea";
		String u = s.toUpperCase();
		
		System.out.print("stringLowerUpper :" );
		System.out.println(u);
	}
	
	public void stringUpperLower()
	{
		String s = "HYUNA";
		String u = s.toLowerCase();
		
		System.out.print("stringUpperLower :" );
		System.out.println(u);
	}
	
	public void intInteger()
	{
		int a = 10;
		Integer aa = new Integer(a);
		
		Integer bb = new Integer(20);
		int b = bb.intValue();
		
		System.out.print("intInteger : " );
		System.out.println(aa);
		System.out.println(b);
	}
	
	public void integerInt()
	{
		Integer aa = new Integer(30);
		int a = aa;
		
		int b = 40;
		Integer bb = new Integer(b);
		
		System.out.print("integerInt : " );
		System.out.println(a);
		System.out.println(bb);
	}
	
	public void intIntegerObject()
	{
		int a = 50;
		Integer aa = new Integer(a);
		Object oba = aa;
		
		System.out.print("intIntegerObject : " );
		System.out.println(oba);
		System.out.println(oba.getClass());
	}
	
	public void objectIntegerInt()
	{
		Object oba = new Object();
		
		int a = (Integer) oba;
		
		System.out.print("objectIntegerInt : " );
		System.out.println(a);
	}
}
